<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // 简单工厂模式
        // var obj = function (name, age, id) {
        //     this.name = name
        //     this.age = age
        //     this.id = id
        // }

        // console.log(new obj("张三", 24, 520))
        // console.log(new obj("李四", 26, 521))

        function fn() {
            // this = {}
            // this.name = 123
            // return this

        }

        console.log(fn())




    </script>
</body>

</html>